package com.ruoyi.youtian.service;


import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.youtian.domain.TWorkspaceCategory;
import com.ruoyi.youtian.domain.TWorkspaceCategoryPointVo;
import com.ruoyi.youtian.domain.TWorkspaceCategoryTreeSelect;
import com.ruoyi.youtian.domain.vo.LinearGraphVo;
import com.ruoyi.youtian.domain.vo.PieChartVo;
import com.ruoyi.youtian.domain.vo.PointVo;

import java.util.List;


/**
 * 工作区分类Service接口
 *
 * @author ruoyi
 * @date 2022-09-07
 */
public interface ITWorkspaceCategoryService
{
    /**
     * 查询工作区分类
     *
     * @param workspaceCategoryId 工作区分类主键
     * @return 工作区分类
     */
    public TWorkspaceCategory selectTWorkspaceCategoryByWorkspaceCategoryId(Long workspaceCategoryId);

    /**
     * 查询工作区分类列表
     *
     * @param tWorkspaceCategory 工作区分类
     * @return 工作区分类集合
     */
    public List<TWorkspaceCategory> selectTWorkspaceCategoryList(TWorkspaceCategory tWorkspaceCategory);

    /**
     * 新增工作区分类
     *
     * @param tWorkspaceCategory 工作区分类
     * @return 结果
     */
    public int insertTWorkspaceCategory(TWorkspaceCategory tWorkspaceCategory);

    /**
     * 修改工作区分类
     *
     * @param tWorkspaceCategory 工作区分类
     * @return 结果
     */
    public int updateTWorkspaceCategory(TWorkspaceCategory tWorkspaceCategory);

    /**
     * 批量删除工作区分类
     *
     * @param workspaceCategoryIds 需要删除的工作区分类主键集合
     * @return 结果
     */
    public int deleteTWorkspaceCategoryByWorkspaceCategoryIds(Long[] workspaceCategoryIds);

    /**
     * 删除工作区分类信息
     *
     * @param workspaceCategoryId 工作区分类主键
     * @return 结果
     */
    public int deleteTWorkspaceCategoryByWorkspaceCategoryId(Long workspaceCategoryId);


    /**
     * 查询站点树结构信息
     *
     * @param tWorkspaceCategory 工作区
     * @return 站点
     */
    public List<TWorkspaceCategoryTreeSelect> selectTWorkspaceCategoryTreeList(TWorkspaceCategory tWorkspaceCategory);

    /**
     * 构建前端所需要树结构
     *
     * @param tWorkspaceCategories  站点列表
     * @return 树结构列表
     */
    public List<TWorkspaceCategory> buildTWorkspaceCategoryTree(List<TWorkspaceCategory> tWorkspaceCategories);


    /**
     * 构建前端所需要树结构
     * @param tWorkspaceCategories
     * @return
     */
    public List<TWorkspaceCategoryTreeSelect> buildTWorkspaceCategoryTreeSelect(List<TWorkspaceCategory> tWorkspaceCategories);


    /**
     * 查验工作区名称唯一
     * @param workspaceCategory
     * @return
     */
    public String checkTWorkspaceCategoryNameUnique(TWorkspaceCategory workspaceCategory);

    /**
     * 是否存在子节点
     *
     * @param workspaceCategoryId 工作区ID
     * @return 结果
     */
    public boolean hasChildByWorkspaceCategoryId(Long workspaceCategoryId);

    /**
     * 工作区下新增点位
     * @param tWorkspaceCategoryPointVo
     * @return
     */
    public int insertPoint(TWorkspaceCategoryPointVo tWorkspaceCategoryPointVo);

    /**
     * 工作区下点位删除
     * @param tWorkspaceCategoryPointVo
     * @return
     */
    public int deletePoint(TWorkspaceCategoryPointVo tWorkspaceCategoryPointVo);


    /**
     *  查询当前节点下所有子集Id
     * @param id
     * @return
     */
    public List<Long>  findChildIdList(TWorkspaceCategoryPointVo tWorkspaceCategoryPointVo);



    /**
     * 查询工作区下点位列表
     * @param childIdList
     * @param pointName
     * @return
     */
    public List<PointVo>  selectPointListByWorkspaceIdList(List<Long> childIdList, String pointName);

    /**
     * 查询设备点位列表
     * @return
     */
    public List<PointVo>  selectDevicePointList(PointVo pointVo);

    /**
     * 线状图
     * @param linearGraphVo
     * @return
     */
    AjaxResult getLineargraph(LinearGraphVo linearGraphVo);

    /**
     * 饼图
     * @param PieChartVo
     * @return
     */
    AjaxResult getPieChart(PieChartVo PieChartVo);


    /**
     * 柱图
     * @param pieChartVo
     * @return
     */
    AjaxResult getColumndiagram(PieChartVo pieChartVo);

}
